package com.project.base.entity;

import java.io.Serializable;

/**
 * 访问日志
 * Created by lvzimin on 16/1/11.
 */
public class AccessLog implements Serializable {
    private static final long serialVersionUID = -4907495277321116967L;
    /**
     * 当前接口方法
     */
    public String method;

    /**
     * 当前页面代码
     */
    public String version;

    /**
     * 当前页面代码
     */
    public String pageCode;

    /**
     * 上步页面代码
     */
    public String lastPageCode;

    /**
     * 产品类型
     */
    public String productType;

    /**
     * 客户端发起请求的时间戳(毫秒)
     */
    public String clientTimestamp;

    public String toLogStr(String seperator) {
        StringBuilder builder = new StringBuilder();
        builder.append(method).append(seperator);
        builder.append(version).append(seperator);
        builder.append(pageCode).append(seperator);
        builder.append(lastPageCode).append(seperator);
        builder.append(productType).append(seperator);
        builder.append(clientTimestamp).append(seperator);
        return builder.toString();
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getPageCode() {
        return pageCode;
    }

    public void setPageCode(String pageCode) {
        this.pageCode = pageCode;
    }

    public String getLastPageCode() {
        return lastPageCode;
    }

    public void setLastPageCode(String lastPageCode) {
        this.lastPageCode = lastPageCode;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    public String getClientTimestamp() {
        return clientTimestamp;
    }

    public void setClientTimestamp(String clientTimestamp) {
        this.clientTimestamp = clientTimestamp;
    }

}
